<template>
  <div>
    <h2>Static template</h2>
    <InputTemplate type="text"></InputTemplate>
    <h2>Dynamically inserted:</h2>
    <div ref="container">
      <button @click="onClick">Click to insert</button>
      <br />
    </div>
  </div>
</template>
<script>
import Vue from 'vue'
import InputTemplate from './InputTemplate.vue';

export default {
  components: { InputTemplate },
  methods: {
    onClick() {
      let ComponentClass = Vue.extend(eval('InputTemplate'))
    }
  }
}
//https://stackoverflow.com/questions/48856616/how-to-programmatically-create-vue-components-indirectly
</script>
<style lang="">

</style>